package com.bfly.mall.product.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bfly.core.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.List;

/**
 * 产品类目
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 20:48
 */
@TableName(value = "product_category",resultMap = "CategoryResultMap")
public class ProductCategory extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 5638435303372460727L;
    private String name;

    @TableField("parent_id")
    private int parentId;

    /**
     * 分类图片
     */
    @TableField("pic")
    private String pic;
    @TableField("seq")
    private int seq;

    @TableField(exist = false)
    private List<ProductCategory> children;

    public List<ProductCategory> getChildren() {
        return children;
    }

    public int getSeq() {
        return seq;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }

    public void setChildren(List<ProductCategory> children) {
        this.children = children;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }
}
